package com.sky.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.sky.dto.DishPageQueryDTO;
import com.sky.entity.Dish;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sky.vo.DishVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 菜品 Mapper 接口
 * </p>
 *
 * @author chensheng
 * @since 2025-08-08
 */
public interface DishMapper extends BaseMapper<Dish> {

    IPage<DishVO> selectByCondition(Page<DishVO> page, @Param("dDTO") DishPageQueryDTO dDTO);

    List<DishVO> selectByCategoryId(Long categoryId);

    /**
     * 根据分类id查询菜品选项
     * @return
     */
    List<Dish> list(Dish dish);
}
